package util {
	import cn.inswf.describe.Description;
	import cn.inswf.describe.Metadata;

	import flash.display.DisplayObject;
	/**
	 * @author Administrator
	 */
	public class UiCopyUtil {
		public static function copy(from:DisplayObject,to:DisplayObject):void{
			var desc:Description=Description.getDescription(to);
			var list:Array=desc.getMeta("ui");
			if(list){
				var len:int=list.length;
				while(len--){
					var meta:Metadata=list[len];
					var name:String=meta.desc.name;
					to[name]=from[name];
				}
			}
			meta=null;
			name=null;
			list=null;
		}
	}
}
